<?php

//include_once( 'pdo_access.inc.php' );

class TAppAuth
{
    // Location of authorization page if user is not logged in
    public         $authURL                   = 'auth.php';
    public         $db                        = $_GLOBALS[ 'DbConnection' ];
    
    // table name where login/password pairs are listed
    public         $tabUser                   = 'user';
    public         $fld
    
    /***************************************************************************
    * isAuthorized
    ***************************************************************************/
    public function isAuthorized()
    {
        if ( isset( $_SERVER[ 'authUserName' ] ) && isset( $_SERVER[ 'authPassword' ] ) )
        {
            $Result = $this->doAuth( $_SERVER[ 'authUserName' ], $_SERVER[ 'authPassword' ] );
        }
        else
        {
            $Result = $_SESSION[ 'authorized' ];
        }
        
        return $Result;
    }
    
    /***************************************************************************
    * authorize
    ***************************************************************************/
    public function authorize()
    {
        ob_end_clean();
        header( 'Location: '.$this->authURL );
    }
    
    /***************************************************************************
    * doAuth
    ***************************************************************************/
    public function doAuth( $aUserName, $aPassword )
    {
        
    }
}

?>